package com.rxt.controller;


import com.rxt.common.result.Result;
import com.rxt.model.vo.KKonwledgePageVo;
import com.rxt.model.vo.KKonwledgeVo;
import com.rxt.model.vo.KRemarkVo;
import com.rxt.service.IKKonwledgeService;
import com.rxt.service.IKRemarkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 周梓文
 * @since 2023-08-24
 */
@Api(tags = "知识评论模块")
@RestController
@RequestMapping("/kRemark")
public class KRemarkController {

    @Autowired
    private IKRemarkService remarkService;

    @PostMapping("/remark")
    @ApiOperation("评论")
    public Result publish(@RequestBody KRemarkVo kRemarkVo){

        return remarkService.remark(kRemarkVo);
    }

    @DeleteMapping("{id}")
    @ApiOperation("根据id删除评论")
    public Result deleteById(@PathVariable Long id){

        return remarkService.deleteById(id);
    }

}

